n = int(input('n:'))

num = 0

while n != 1:
    if n % 2 == 1:
        n = n * 3 + 1
    else:
        n/=2
    num += 1

print('步骤数为:', num)
